//
//  JZHCEView.h
//  极致荟
//
//  Created by hetao on 14-5-8.
//  Copyright (c) 2014年 mac. All rights reserved.
//

#import <UIKit/UIKit.h>

typedef void (^pusBlock)(int i);

/*当侧边栏完全显示和遮挡是
 */
typedef void (^ultimatedirection)(int i);

typedef void (^AllData)();//点击全部BLOCK
@protocol CEViewDelete;

@interface JZHCEView : UIView<UITableViewDataSource,UITableViewDelegate,UIGestureRecognizerDelegate,UITextFieldDelegate>
{
    UIView *view;//添加的VIew
}

@property (weak, nonatomic) IBOutlet UITextField *sotext;
@property (assign,nonatomic)CGFloat agtime;//动画时间
@property (retain,nonatomic)UIViewController *controller;
@property (weak, nonatomic) IBOutlet UITableView *table;

@property (weak, nonatomic) IBOutlet UIView *topview;
@property (copy,nonatomic)NSArray *arr;
@property (nonatomic,copy) AllData alldata;
@property (nonatomic,assign)id<CEViewDelete>  ceDelete;
//当侧边栏完全显示和遮挡回调
@property (copy,nonatomic)ultimatedirection rection;
//选中cell时回调
@property (copy,nonatomic)pusBlock pusblock;
/*
 *arr:构成侧边栏的数据数组
 *controller:试用用侧边栏视图控制器
 *stype:侧边栏类型
 */
- (JZHCEView *)initarr:(NSArray *)arr viewConetroller:(UIViewController *)controller TopviewStype:(int)stype;

///左滑动
- (void)left;

///右滑动
- (void)right;
///撤销侧边栏
- (void)remove;

///是否使用滑动手势来滑动
- (void)panGesturUserEnable:(BOOL)end;

@end

@protocol CEViewDelete

@optional

///点击搜索文本框键盘搜索按钮时调用
- (void)CESo:(NSString *)str;
@end